#pragma once
#include "User.h"
#include "Seat.h"
#include <vector>

class Table
{
public:
	Table(int _t);
	~Table();
//用户基本操作
	int loginTable(User *_p);
	int logoutTable(User *_p);
	int sitTable(User *_p, int seatid);
	int standTable(User *_p);
//游戏开始事件
	int readyPlay(User *_p);
	void initStartGame();
	void startTableGame();
	void overTableGame();
//打牌过程中的函数
	int chipinCard(User *_p, pokerVec &pokers);
private:
	Seat& getSeatFromUser(int seatid);
	bool isValidSeatid(int seatid);
	void delLookUser(User *_p);
	void addLookUser(User *_p);
public:
	void __TableInfo__();
private:
	int tid;
	int bid;
	Seat tableSeat[3];
	u64_t buyinMoney;
//游戏内部
	int dealerSeat;
	int playingSeat;
	int pointTotal;
	pokerVec bottomPoker;
	pokerVec lastHandPoker;

	std::vector<User *> lookUsers;
};

